package org.fuyd.designpattern.proxy;

public class Tank3 implements Moveable {
  
  Tank tank;
  
  private Tank3(Tank tank) {
    super();
    this.tank = tank;
  }

  public void move() {
    //采用实现接口的方法来计算tank的move方法运行了多长时间
    //聚合关系
    long start = System.currentTimeMillis();
    tank.move();
    long end = System.currentTimeMillis();
    System.out.println("运行了：" + (end - start) + "毫秒");
  }

}
